﻿using System;
using FX.CC.Andon.Service.CommManage;
using FX.CC.Andon.Utility.Common;

namespace FX.CC.Andon.Business
{
    public class CommonBusiness
    {
        private readonly CommonService _dal=new CommonService();

        public int CheckedCode(string tableName, string fieldName, string code)
        {
            return _dal.CheckedCode(tableName, fieldName, code);
        }

        public string GetPinyin(string name)
        {
            return PinYin.GetFirstPinyin(name);
        }

        public bool Freeze(string table, string field, string value)
        {
            return _dal.Freeze(table, field, value);
        }

        public bool Unfrozen(string table, string field, string value)
        {
            return _dal.Unfrozen(table, field, value);
        }

        public int CheckedCodes(string tableName, string fieldName1, string fieldName2, string code1, string code2)
        {
            return _dal.CheckedCodes(tableName, fieldName1, fieldName2, code1, code2);
        }

        public int CheckedPwd(string loginCode, string pwd)
        {
            return _dal.CheckedPwd(loginCode, pwd);
        }

    }
}
